//
//  MoreTableVC.m
//  BCW
//
//  Created by Mac on 16/3/30.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "MoreTableVC.h"
#import "ContactUsTableVC.h"
#import "FeedBackVC.h"
#import "UIBarButtonItem+CustomItem.h"

@interface MoreTableVC ()

@end

@implementation MoreTableVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"更多";
    self.navigationController.navigationBar.barTintColor = ThemeColor;
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImage:@"return" hightImage:@"return" target:self action:@selector(popViewController:)];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
    if (indexPath.row == 0) {
        ContactUsTableVC *contact = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"contact"];
        [self.navigationController pushViewController:contact animated:YES];
    }
    else if(indexPath.row == 1){
        FeedBackVC *feedback = [[FeedBackVC alloc] init];
        [self.navigationController pushViewController:feedback animated:YES];
    }
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 20;
}

- (void)popViewController:(id)sender{
    [self dismissViewControllerAnimated:YES completion:nil];
}
@end
